Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prosemirror-trailing-node

Package Overview
Dependencies
Maintainers
1
Versions
208
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-trailing-node

A trailing node plugin for the prosemirror editor.

  • 1.0.11
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
950K
decreased by-14.56%
Maintainers
1
Weekly downloads
 
Created
Source

prosemirror-trailing-node

"A trailing node plugin for the prosemirror editor.

Version Weekly Downloads Bundled size Typed Codebase MIT License


The problem

You want your editor to always have allow exiting the current non-empty node.

This solution

prosemirror-trailing-node allows you to set a default node that will be appended to the end of the document.


Installation

# yarn
yarn add prosemirror-trailing-node prosemirror-view prosemirror-state prosemirror-keymap

# pnpm
pnpm add prosemirror-trailing-node prosemirror-view prosemirror-state prosemirror-keymap

# npm
npm install prosemirror-trailing-node prosemirror-view prosemirror-state prosemirror-keymap

The installation requires the installation of the peer dependencies prosemirror-view, prosemirror-state and prosemirror-model to avoid version clashes.


Getting Started

import { schema } from 'prosemirror-schema-basic';
import { trailingNode } from 'prosemirror-trailing-node';

// Include the plugin in the created editor state.
const state = EditorState.create({
  schema,
  plugins: [trailingNode({ ignoredNodes: [], nodeName: 'paragraph' })],
});

FAQs

Package last updated on 17 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc